package com.hangzhou.welbeing.welbeinginstrument.activity;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.hangzhou.welbeing.welbeinginstrument.R;
import com.hangzhou.welbeing.welbeinginstrument.adapter.MyDeviceAdapter;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 时间 2017 年 09 月 22.
 * 作者 Administrator  刘传华
 * 公司 杭州惟君医疗科技有限公司
 * 包名 com.hangzhou.welbeing.pregnant.welbeing_pregnant.activity
 * 工程名 welbeing_pregnant
 */
public class MyDeviceActivity extends Activity {
    @Bind(R.id.activity_my_device_iv_return)
    ImageView activityMyDeviceIvReturn;
    @Bind(R.id.activity_my_device_iv_add_devices)
    ImageView activityMyDeviceIvAddDevices;
    @Bind(R.id.activity_my_device_ll_add_device)
    LinearLayout activityMyDeviceLlAddDevice;
    @Bind(R.id.activity_my_device_RecyclerView)
    RecyclerView activityMyDeviceRecyclerView;
    @Bind(R.id.activity_my_device_rl_binding_device)
    RelativeLayout activityMyDeviceRlBindingDevice;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_device);
        ButterKnife.bind(this);

        //创建默认的线性LayoutManager
        LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);
        mLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        activityMyDeviceRecyclerView.setLayoutManager(mLayoutManager);
        MyDeviceAdapter myDeviceAdapter = new MyDeviceAdapter();
        activityMyDeviceRecyclerView.setAdapter(myDeviceAdapter);
    }

    @OnClick({R.id.activity_my_device_iv_return, R.id.activity_my_device_iv_add_devices})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.activity_my_device_iv_return:
                finish();
                break;
            case R.id.activity_my_device_iv_add_devices:
                break;
        }
    }
}
